package vista;
import java.awt.BorderLayout;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaPersonalizado extends javax.swing.JDialog  implements ActionListener{
	public VentanaPersonalizado(Dialog owner, boolean modal) {
		super(owner, modal);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Dialog owner, String title, boolean modal,
			GraphicsConfiguration gc) {
		super(owner, title, modal, gc);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Dialog owner, String title, boolean modal) {
		super(owner, title, modal);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Dialog owner, String title) {
		super(owner, title);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Dialog owner) {
		super(owner);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Frame owner, boolean modal) {
		super(owner, modal);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Frame owner, String title, boolean modal,
			GraphicsConfiguration gc) {
		super(owner, title, modal, gc);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Frame owner, String title) {
		super(owner, title);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Frame owner) {
		super(owner);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Window owner, ModalityType modalityType) {
		super(owner, modalityType);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Window owner, String title,
			ModalityType modalityType, GraphicsConfiguration gc) {
		super(owner, title, modalityType, gc);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Window owner, String title,
			ModalityType modalityType) {
		super(owner, title, modalityType);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Window owner, String title) {
		super(owner, title);
		// TODO Auto-generated constructor stub
	}

	public VentanaPersonalizado(Window owner) {
		super(owner);
		// TODO Auto-generated constructor stub
	}
	private JPanel jPanel1;
	private JTextField txtfilas;
	private JButton btnsalir;
	private JButton bntaceptar;
	private JTextField txtminas;
	private JTextField txtcolumnas;
	private JLabel lblminas;
	private JLabel lblfilas;
	private JLabel lblcolumnas;
	private JLabel lbltitulo;
	int minas, columnas, filas;

	public JPanel getjPanel1() {
		return jPanel1;
	}

	public void setjPanel1(JPanel jPanel1) {
		this.jPanel1 = jPanel1;
	}

	public JTextField getTxtfilas() {
		return txtfilas;
	}

	public void setTxtfilas(JTextField txtfilas) {
		this.txtfilas = txtfilas;
	}

	public JButton getBtnsalir() {
		return btnsalir;
	}

	public void setBtnsalir(JButton btnsalir) {
		this.btnsalir = btnsalir;
	}

	public JButton getBntaceptar() {
		return bntaceptar;
	}

	public void setBntaceptar(JButton bntaceptar) {
		this.bntaceptar = bntaceptar;
	}

	public JTextField getTxtminas() {
		return txtminas;
	}

	public void setTxtminas(JTextField txtminas) {
		this.txtminas = txtminas;
	}

	public JTextField getTxtcolumnas() {
		return txtcolumnas;
	}

	public void setTxtcolumnas(JTextField txtcolumnas) {
		this.txtcolumnas = txtcolumnas;
	}

	public JLabel getLblminas() {
		return lblminas;
	}

	public void setLblminas(JLabel lblminas) {
		this.lblminas = lblminas;
	}

	public JLabel getLblfilas() {
		return lblfilas;
	}

	public void setLblfilas(JLabel lblfilas) {
		this.lblfilas = lblfilas;
	}

	public JLabel getLblcolumnas() {
		return lblcolumnas;
	}

	public void setLblcolumnas(JLabel lblcolumnas) {
		this.lblcolumnas = lblcolumnas;
	}

	public JLabel getLbltitulo() {
		return lbltitulo;
	}

	public void setLbltitulo(JLabel lbltitulo) {
		this.lbltitulo = lbltitulo;
	}

	public void setMinas(int minas) {
		this.minas = minas;
	}

	public void setColumnas(int columnas) {
		this.columnas = columnas;
	}

	public void setFilas(int filas) {
		this.filas = filas;
	}

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VentanaPersonalizado inst = new VentanaPersonalizado();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaPersonalizado() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Personalizado");
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
			//	jPanel1.setLayout(jPanel1Layout);
				jPanel1.setBackground(new java.awt.Color(255,255,255));
				jPanel1.setLayout(null);
				{
					lbltitulo = new JLabel();
					jPanel1.add(lbltitulo);
					lbltitulo.setText("Nivel Personalizado");
					lbltitulo.setBounds(117, 18, 165, 15);
					lbltitulo.setFont(new java.awt.Font("Bitstream Charter",1,16));
					lbltitulo.setForeground(new java.awt.Color(0,0,255));
				}
				{
					lblcolumnas = new JLabel();
					jPanel1.add(lblcolumnas);
					lblcolumnas.setText("Numero de Columnas:");
					lblcolumnas.setBounds(24, 70, 145, 15);
					lblcolumnas.setForeground(new java.awt.Color(0,0,255));
					lblcolumnas.setFont(new java.awt.Font("Bitstream Charter",1,14));
				}
				{
					lblfilas = new JLabel();
					jPanel1.add(lblfilas);
					lblfilas.setText("Numero de Filas:");
					lblfilas.setBounds(24, 103, 109, 15);
					lblfilas.setForeground(new java.awt.Color(0,0,255));
					lblfilas.setFont(new java.awt.Font("Bitstream Charter",1,14));
				}
				{
					lblminas = new JLabel();
					jPanel1.add(lblminas);
					lblminas.setText("Numero de Minas:");
					lblminas.setBounds(24, 130, 119, 15);
					lblminas.setForeground(new java.awt.Color(0,0,255));
					lblminas.setFont(new java.awt.Font("Bitstream Charter",1,14));
				}
				{
					txtcolumnas = new JTextField();
					jPanel1.add(txtcolumnas);
					txtcolumnas.setBounds(187, 67, 44, 22);
					txtcolumnas.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtcolumnas.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txtfilas = new JTextField();
					jPanel1.add(txtfilas);
					txtfilas.setBounds(187, 95, 44, 22);
					txtfilas.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtfilas.setForeground(new java.awt.Color(0,0,255));
				}
				{
					txtminas = new JTextField();
					jPanel1.add(txtminas);
					txtminas.setBounds(187, 123, 44, 22);
					txtminas.setFont(new java.awt.Font("Bitstream Charter",1,14));
					txtminas.setForeground(new java.awt.Color(0,0,255));
				}
				{
					bntaceptar = new JButton();
					jPanel1.add(bntaceptar);
					bntaceptar.setText("Aceptar");
					bntaceptar.setBounds(264, 73, 76, 22);
					bntaceptar.setFont(new java.awt.Font("Bitstream Charter",1,14));
					bntaceptar.setForeground(new java.awt.Color(0,0,0));
				}
				{
					btnsalir = new JButton();
					jPanel1.add(btnsalir);
					btnsalir.setText("Salir");
					btnsalir.setBounds(264, 106, 76, 22);
					btnsalir.setFont(new java.awt.Font("Bitstream Charter",1,14));
					btnsalir.setForeground(new java.awt.Color(0,0,0));
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public void addListener(ActionListener actionListener) {

		bntaceptar.addActionListener(actionListener);
		btnsalir.addActionListener(actionListener);		
	}
	
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	

	public String getColumnas() {
		return txtcolumnas.getText();
	}
	
	public String getFilas()
	{
		return txtfilas.getText();
	}
	public String getMinas()
	{
		return txtminas.getText();
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		
	}


}
